ADB Terminal

ADB is the abbreviation for Android Debug Bridge, a set of command-line tools used for communication between a host computer and a device. Through ADB, users can view device connection status, enter the device Shell, transfer files, restart the device, and execute debugging commands on the computer side.

On the Quectel Pi M1 / L1 Debian system, ADB is primarily used for local debugging and quick file transfers during the development phase. After connecting the computer to the development board via a USB Type-C cable, you can use commands such as adb devices, adb shell, adb push, adb pull to manage the device.

💡 Note: The adb shell on L1 defaults to the root user, which can be used directly to view system status, start services, and modify configurations. When executing high-privilege commands, you typically do not need to add sudo.

Preparation

  1. Prepare a USB to Type-C cable, connect the Type-C end to the USB-C port of the Quectel Pi M1 / L1, and connect the other end to the host computer.

../../../_images/image_VeKnbClWnonahMx3Yr1chnqpn4c.webp
  1. On the computer side, download the platform-tools tool and extract it to a local directory.

  2. Open the folder where the platform-tools tool is located, type cmd in the address bar at the top, and press Enter to open the ADB terminal.

../../../_images/image_Mk8ibkEdloqWZwxopC4c58fenmh.webp ../../../_images/image_CMNubVhpyobOsYxowUWcPZ8Cn4c.webp ../../../_images/image_Tc48bDJmDoz7EZx6mFWcf8NKn8f.webp

Software Installation

The host computer needs to have platform-tools installed or extracted, which includes the adb command.

The Quectel Pi L1 / M1 Debian system already has the ADB service integrated, with the service name adbd.service and the program path /sbin/adbd. Typically, no additional software packages need to be installed.

You can check the ADB service status on the development board:

systemctl status adbd.service --no-pager -l

Software Configuration

The ADB service is managed by adbd.service. Common configuration and management methods are as follows:

Configuration Item

Description

Service Name

adbd.service

Dependent Service

usb.service

Connection Method

USB Type-C cable connecting the host computer and the development board

Typical Use Cases

Shell debugging, file transfer, device status viewing

To restrict ADB usage, you can stop or disable the ADB service. It is recommended to restart the system after disabling to keep the state consistent:

sudo systemctl stop adbd.service
sudo systemctl disable adbd.service
sudo reboot

To re-enable the ADB service, execute:

sudo systemctl start adbd.service
sudo systemctl enable adbd.service
sudo reboot

Software Startup

Start the ADB service:

sudo systemctl start adbd.service

Enable auto-start on boot:

sudo systemctl enable adbd.service

Check current status:

systemctl status adbd.service --no-pager -l
systemctl is-active adbd.service

Restart the service:

sudo systemctl restart adbd.service

ADB Debugging

View Connected Devices

Execute in the ADB terminal on the host computer:

adb devices

If a device serial number appears in the list with the status device, it means the computer has recognized the development board.

Enter Device Shell

Execute on the host computer:

adb shell

After entering the Shell, you can execute common Linux commands in the development board system. The L1 ADB Shell defaults to the root user. You can confirm this by executing:

id
whoami

To exit the Shell, enter:

exit
../../../_images/image_MozfbNJYDoclcXxs27scINhanhc.webp

Transfer Files from Computer to Device

# Usage: adb push <computer file path> <device destination path>
adb push ./test.txt /data/local/tmp/

Transfer Files from Device to Computer

# Usage: adb pull <device file path> <computer destination path>
adb pull /data/local/tmp/test.txt ./

Where ./ indicates saving to the directory where the ADB terminal is currently open.

Restart the Device

adb reboot

Troubleshooting

Symptom

Troubleshooting Method

adb devices shows no device

Check if the USB cable supports data transfer; confirm the cable is connected to the USB-C port of the L1 / M1; re-plug and execute adb devices again.

Device status is offline

Execute adb kill-server and adb start-server, then reconnect.

No adb command on host computer

Confirm that platform-tools has been extracted, open the terminal in that directory, or add platform-tools to the system environment variables.

Service not running on the development board

Execute systemctl status adbd.service --no-pager -l on the development board to check the service status, and execute sudo systemctl restart adbd.service as needed.

File transfer failed

Check if the target path exists and has write permissions. It is recommended to use the /data/local/tmp/ directory for testing first.